// This file was decompiled using SASCM.INI published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread 'XMYTH28' 

:XMYTH28_11
0A95: enable_thread_saving
wait 100 
if 
   Player.Defined($PLAYER_CHAR)
jf @XMYTH28_11
00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes
if and
   $ONMISSION == 0
   $TIME_HOURS <= 6
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2492.7205 -1704.203 1018.3437 radius 1.0 1.0 2.0
jf @XMYTH28_11
jump @XMYTH28_12 

:XMYTH28_12
wait 1
Model.Load(1776)
023C: load_special_actor 'XMYTH23' as 1 // models 290-299
30@ = Audiostream.Load3D("CLEO\MYTHS\XMYTH28.mp3") 
jump @XMYTH28_13

:XMYTH28_13
wait 1
if and
    Model.Available(1776)
023D:   special_actor 1 loaded
jf @XMYTH28_12
jump @XMYTH28_14

:XMYTH28_14
wait 1
$ONMISSION = 1
0@ = Actor.Create(Mission1, #SPECIAL01, 2495.8875, -1700.3962, 1018.3437)
Actor.Angle(0@) = 132.3824
Actor.Health(0@) = 850
Actor.SetWalkStyle(0@, "PLAYER")
093B: set_actor 0@ upper_body_damage_anims_only 1
0946: set_actor 0@ actions_uninterupted_by_weapon_fire 1
0446: set_actor 0@ dismemberment_possible 0
0337: set_actor 0@ visibility 0
060A: create_decision_maker_type 2 store_to 20@ // decision\allowed\m_.ped files
060B: set_actor 0@ decision_maker_to 20@
Object.Create(1@, 1776, 2492.3806, -1706.0177, 1018.3437)
Object.Angle(1@) = 180.0
0750: set_object 1@ visibility 0
wait 350
Object.SetImmunities(1@, 1, 1, 1, 1, 1)
Actor.SetImmunities(0@, 1, 1, 1, 1, 1)
0619: enable_actor 0@ collision_detection 0
jump @XMYTH28_15

:XMYTH28_15
wait 0
if
82CB:   not actor 0@ bounding_sphere_visible
jf @XMYTH28_16
0619: enable_actor 0@ collision_detection 1
0337: set_actor 0@ visibility 1
0850: AS_actor 0@ follow_actor $PLAYER_ACTOR
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0
jump @XMYTH28_20

:XMYTH28_16
wait 0
if or
    Actor.Dead($PLAYER_ACTOR)
    Actor.Dead(0@)
jf @XMYTH28_15
$ONMISSION = 0
Actor.DestroyWithFade(0@)
Object.RemoveReferences(1@)
Model.Destroy(1776)
0296: unload_special_actor 1
wait 2500
jump @XMYTH28_11
 
:XMYTH28_20
wait 0
if
00F2:   actor 0@ near_actor $PLAYER_ACTOR radius 1.2 1.2 sphere 0
jf @XMYTH28_21
0924: enable_screen_darkness 1 with_value 255
05BE: AS_actor $PLAYER_ACTOR die
0581: enable_radar 0
0826: enable_hud 0
01B4: set_player $PLAYER_CHAR can_move 0
wait 6000
0901: enable_player $PLAYER_CHAR jump_key 0
Object.RemoveReferences(1@)
Model.Destroy(1776)
0924: enable_screen_darkness 1 with_value 0
0924: enable_screen_darkness 0 with_value 0
Audiostream.PerformAction(30@, PLAY)
Audiostream.LinkToActor(30@, $PLAYER_ACTOR)
Audiostream.Loop(30@, 1)
0687: clear_actor 0@ task
Actor.SetImmunities(0@, 0, 1, 1, 1, 1)
jump @XMYTH28_30     

:XMYTH28_21
wait 0
if or
    Actor.Dead($PLAYER_ACTOR)
    Actor.Dead(0@)
jf @XMYTH28_20
Actor.DestroyWithFade(0@)
Object.RemoveReferences(1@)
Model.Destroy(1776)
0296: unload_special_actor 1
wait 2500
jump @XMYTH28_11

:XMYTH28_30
077E: get_active_interior_to $ACTIVE_INTERIOR
01B4: set_player $PLAYER_CHAR can_move 1
03BF: set_player $PLAYER_CHAR ignored_by_everyone 0
04C4: store_coords_to 10@ 11@ 12@ from_actor $PLAYER_ACTOR with_offset 4.1 3.6 10.0
02CE: 12@ = ground_z_at 10@ 11@ 12@
0337: set_actor 0@ visibility 0
0860: link_actor 0@ to_interior $ACTIVE_INTERIOR
0006: 32@ = 0
wait 500
Actor.PutAt(0@, 10@, 11@, 12@)
wait 250
0619: enable_actor 0@ collision_detection 0
wait 950
jump @XMYTH28_31

:XMYTH28_31
wait 0
if
82CB:   not actor 0@ bounding_sphere_visible
jf @XMYTH28_31
0619: enable_actor 0@ collision_detection 1
0337: set_actor 0@ visibility 1
wait 100
05BF: AS_actor 0@ look_at_actor $PLAYER_ACTOR -1 ms
jump @XMYTH28_32

:XMYTH28_32
wait 0
if
    Actor.Dead($PLAYER_ACTOR)
jf @XMYTH28_33
wait 5600
jump @XMYTH28_30

:XMYTH28_33
wait 0
if and
  not Actor.Dead($PLAYER_ACTOR)
00F2:   actor 0@ near_actor $PLAYER_ACTOR radius 2.2 2.2 sphere 0
jf @XMYTH28_34
0924: enable_screen_darkness 1 with_value 255
wait 1
0208: 17@ = random_float_in_ranges -2400.0 2400.0
0208: 18@ = random_float_in_ranges -2400.0 2400.0
Actor.PutAt($PLAYER_ACTOR, 17@, 18@, 10.0)
01B4: set_player $PLAYER_CHAR can_move 0
05BE: AS_actor $PLAYER_ACTOR die
0619: enable_actor 0@ collision_detection 0
wait 5900
0924: enable_screen_darkness 1 with_value 0
0687: clear_actor 0@ task
jump @XMYTH28_30     

:XMYTH28_34
wait 1
if
0019: 32@ > 7200
jf @XMYTH28_40
jump @XMYTH28_35

:XMYTH28_35
wait 1
0209: 19@ = random_int_in_ranges 0 5
if
   19@ == 1
jf @XMYTH28_36
04C4: store_coords_to 10@ 11@ 12@ from_actor $PLAYER_ACTOR with_offset 2.9 3.7 0.1
wait 1
0972: put_actor 0@ at 10@ 11@ 12@ no_offset
0006: 32@ = 0
jump @XMYTH28_40

:XMYTH28_36
wait 1
if
   19@ == 2
jf @XMYTH28_37
04C4: store_coords_to 10@ 11@ 12@ from_actor $PLAYER_ACTOR with_offset 2.9 -3.7 0.1
wait 1
0972: put_actor 0@ at 10@ 11@ 12@ no_offset
0006: 32@ = 0
jump @XMYTH28_40

:XMYTH28_37
wait 1
if
   19@ == 3
jf @XMYTH28_38
04C4: store_coords_to 10@ 11@ 12@ from_actor $PLAYER_ACTOR with_offset -2.9 3.7 0.1
wait 1
0972: put_actor 0@ at 10@ 11@ 12@ no_offset
0006: 32@ = 0
jump @XMYTH28_40

:XMYTH28_38
wait 1
if
   19@ == 4
jf @XMYTH28_35
04C4: store_coords_to 10@ 11@ 12@ from_actor $PLAYER_ACTOR with_offset -2.9 -3.7 0.1
wait 1
0972: put_actor 0@ at 10@ 11@ 12@ no_offset
0006: 32@ = 0
jump @XMYTH28_40  

:XMYTH28_40
wait 0
Actor.StorePos($PLAYER_ACTOR, 10@, 11@, 12@)
0615: define_AS_pack_begin 15@
05D3: AS_actor -1 goto_point 10@ 11@ 12@ mode 7 time -1 ms // versionA
07A1: set_walk_speed 7
0616: define_AS_pack_end 15@
0618: assign_actor 0@ to_AS_pack 15@
wait 10
061B: remove_references_to_AS_pack 15@
wait 10
jump @XMYTH28_41

:XMYTH28_41
wait 0
if
 not Actor.Dead(0@)
jf @XMYTH28_42
0393: actor 0@ perform_animation "run_player" at 1.9 times_normal_rate 
0393: actor 0@ perform_animation "WALK_player" at 1.9 times_normal_rate
0393: actor 0@ perform_animation "WALK_civi" at 1.9 times_normal_rate
jump @XMYTH28_42

:XMYTH28_42
wait 0
if
  Actor.Dead(0@)
jf @XMYTH28_43
jump @XMYTH28_FINAL

:XMYTH28_43
wait 0
if
02D8:   actor $PLAYER_ACTOR current_weapon == 38
jf @XMYTH28_44
Actor.SetImmunities(0@, 1, 1, 1, 1, 1)
jump @XMYTH28_44

:XMYTH28_44
wait 0
if
82D8:   actor $PLAYER_ACTOR current_weapon == 38
jf @XMYTH28_32
Actor.SetImmunities(0@, 0, 1, 1, 1, 1)
jump @XMYTH28_32

:XMYTH28_FINAL
wait 0
$ONMISSION = 0
Actor.DestroyWithFade(0@)
0296: 1
0901: enable_player $PLAYER_CHAR jump_key 1
Audiostream.PerformAction(30@, STOP)
Audiostream.Release(30@)
Player.ClearWantedLevel($PLAYER_CHAR)
0394: play_music 1 
01E3: show_text_1number_styled GXT 'XMYTH28' number 25000 time 5000 style 1 
Player.Money($PLAYER_CHAR) += 25000
0581: enable_radar 1
0826: enable_hud 1
wait 500 
065C: release_decision_maker 20@ 
0A93: